<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
	<th:block th:include="include :: header('百度ECharts')" />
</head>
<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: echarts-js" />
    <script type="text/javascript">
        var prefix = ctx + "hot";
        $(function () {
            queryUserList();
        });
        function queryUserList() {
            var options = {
                url: prefix + "/list",
                // createUrl: prefix + "/add",
                // updateUrl: prefix + "/edit/{id}",
                // removeUrl: prefix + "/remove",
                // exportUrl: prefix + "/export",
                // importUrl: prefix + "/importData",
                // importTemplateUrl: prefix + "/importTemplate",
                sortName: "createDate",
                sortOrder: "desc",
                modalName: "用户",
                columns: [{
                    checkbox: true
                },
                    {
                        field: 'id',
                        title: 'ID'
                    },
                    {
                        field: 'text',
                        title: '热搜',
                        sortable: false
                    },
                    {
                        field: 'url',
                        title: '链接',
                        cellStyle: function (value, row, index) {
                            return {
                                css: {
                                    "min-width": "100px",
                                    "white-space": "nowrap",
                                    "text-overflow": "ellipsis",
                                    "overflow": "hidden",
                                    "max-width": "200px"
                                }
                            }
                        },
                        formatter: function (value, row, index) {
                            return "" + value + "";
                        }
                    },
                    {
                        field: 'hotPoint',
                        title: '热搜指数'
                    },
                    {
                        field: 'summary',
                        title: '概要'
                    },
                    {
                        field: 'createDate',
                        title: '创建时间',
                        sortable: false
                    }]

            };
            $.table.init(options);
        }
    </script>
</body>
</html>